package com.irs.mapper;

import java.util.List;

import com.tuosha.model.UsersEntity;
import org.apache.ibatis.annotations.Select;

import com.irs.pojo.TbUsers;


public interface MainMapper {
	@Select("select * from users where to_days(created_at) = to_days(now());")
	List<UsersEntity> selUsersToday();
	
	@Select("SELECT * FROM users WHERE TO_DAYS( NOW( ) ) - TO_DAYS( created_at)= 1  ")
	List<UsersEntity> selUsersYesterday();
	
	@Select("SELECT * FROM  users WHERE YEARWEEK(date_format(created_at,'%Y-%m-%d')) = YEARWEEK(now());")
	List<UsersEntity> selUsersYearWeek();
	
	@Select("SELECT * FROM users WHERE DATE_FORMAT( created_at, '%Y%m' ) = DATE_FORMAT( CURDATE( ) , '%Y%m' )")
	List<UsersEntity> selUsersMonth();
}
